﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/MasterPage.Master" AutoEventWireup="true"
    CodeBehind="PaginaCadastroCliente.aspx.cs" Inherits="Manager.PaginaCadastroCliente" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .watermarked
        {
            color: #CCCCCC;
            background-color: White;
            padding: 2px;
            font-size: 25px;
        }
        
        .nonwatermarked
        {
            font-size: 25px;
            color: Black;
            background-color: White;
            padding: 2px;
        }
        
        transbox
        {
            margin: 8px;
            background-color: #ffffff;
            border: 1px solid black;
            filter: alpha(opacity=60);
            opacity: 0.2;
        }
        
        .hightlight
        {
            background-color: Red;
        }
        .none
        {
            display: none;
        }
        .combobox
        {
            bordercolor: Red;
            borderstyle: Solid;
            borderwidth: 2px;
        }
        
        .modalBackground
        {
            background-color: #FFF;
            filter: alpha(opacity=70);
            opacity: 0.7;
        }
        .modalPopup
        {
            border: 3px solid Silver;
            background-image: url('/Imagens/Novo_Layout.png');
            background-repeat: repeat-x;
            padding: 3px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder" runat="server">
    <div style="height: auto; width: auto; padding-top: 5px; padding-left: 10px">
        <div style="margin-top: 15px; margin-right: 15px; height: 26px; background-image: url('Layout/Layout_Topicos.png');
            padding-left: 4px; background-repeat: repeat-x;">
            <asp:Label ID="Label1" runat="server" Font-Size="Medium" ForeColor="#333333" 
                Text="Cadastro Cliente"></asp:Label>
        </div>
        <div style="margin-right: 15px; margin-bottom: 15px; padding-left: 4px; background-color: #FFFFFF;
            height: auto">
            <table>
                <tr>
                    <td>
                        <asp:TextBox ID="txtNome" runat="server" Height="18px" Width="400px" CssClass="nonwatermarked"
                        Font-Names="Calibri" Font-Size="16px" BorderColor="Red" BorderStyle="Solid" BorderWidth="2px">
                        </asp:TextBox>
                        <asp:TextBoxWatermarkExtender ID="txtNome_TextBoxWatermarkExtender" 
                            runat="server" TargetControlID="txtNome" WatermarkText="Nome Cliente" WatermarkCssClass="watermarked">
                        </asp:TextBoxWatermarkExtender>
                         <asp:RequiredFieldValidator ID="txtNome_RequiredFieldValidator" runat="server" ErrorMessage="O campo 'Nome' esta em branco, ele deve ser preenchido"
                        Display="None" ControlToValidate="txtNome">
                    </asp:RequiredFieldValidator>
                    <asp:ValidatorCalloutExtender ID="txtNome_ValidatorCalloutExtender" runat="server" TargetControlID="txtNome_RequiredFieldValidator"
                        Width="300px" PopupPosition="Right" CloseImageUrl="~/Layout/Bt_Cancelar.png"
                        WarningIconImageUrl="~/ImagensErros/Atencao.png">
                    </asp:ValidatorCalloutExtender>
                    </td>
                </tr>
                <tr>
                     <td>
                        <asp:TextBox ID="txtCep" runat="server" Height="18px" Width="150px" CssClass="nonwatermarked"
                        Font-Names="Calibri" Font-Size="16px" BorderColor="Red" BorderStyle="Solid" 
                             BorderWidth="2px" AutoPostBack="True"></asp:TextBox>
                         <asp:TextBoxWatermarkExtender ID="txtCep_TextBoxWatermarkExtender" 
                             runat="server" TargetControlID="txtCep" WatermarkText="Cep" WatermarkCssClass="watermarked">
                         </asp:TextBoxWatermarkExtender>
                          <asp:RequiredFieldValidator ID="txtCep_RequiredFieldValidator" runat="server" ErrorMessage="O campo 'Cep' esta em branco, ele deve ser preenchido"
                        Display="None" ControlToValidate="txtCep">
                    </asp:RequiredFieldValidator>
                    <asp:ValidatorCalloutExtender ID="txtCep_ValidatorCalloutExtender" runat="server" TargetControlID="txtCep_RequiredFieldValidator"
                        Width="300px" PopupPosition="Right" CloseImageUrl="~/ImagensErros/Cancelar1.png"
                        WarningIconImageUrl="~/ImagensErros/Atencao.png">
                    </asp:ValidatorCalloutExtender>
                    </td>
                </tr>
                <tr>
                    <td>
                        <table cellpadding="0" cellspacing="0">
                            <tr>
                                <td>
                                     <asp:TextBox ID="txtLogradouro" runat="server" Height="18px" Width="300px" CssClass="nonwatermarked"
                        Font-Names="Calibri" Font-Size="16px" BorderColor="Red" BorderStyle="Solid" 
                                         BorderWidth="2px" Enabled="False" BackColor="Aqua"></asp:TextBox>
                                     <asp:TextBoxWatermarkExtender ID="txtLogradouro_TextBoxWatermarkExtender" 
                                         runat="server" TargetControlID="txtLogradouro" WatermarkText="Endereço" WatermarkCssClass="watermarked">
                                     </asp:TextBoxWatermarkExtender>
                                </td>
                                <td style="padding-left: 2px">
                                     <asp:Seadragon ID="Seadragon1" runat="server">
                                     </asp:Seadragon>
                                     <asp:TextBox ID="txtNumero" runat="server" Height="18px" Width="120px" CssClass="nonwatermarked"
                        Font-Names="Calibri" Font-Size="16px" BorderColor="Red" BorderStyle="Solid" 
                                         BorderWidth="2px"></asp:TextBox>
                                     <asp:MaskedEditExtender ID="txtNumero_MaskedEditExtender" runat="server" 
                                         Mask="9999999" MaskType="Number" TargetControlID="txtNumero">
                                     </asp:MaskedEditExtender>
                                     <asp:TextBoxWatermarkExtender ID="txtNumero_TextBoxWatermarkExtender" 
                                         runat="server" TargetControlID="txtNumero" WatermarkText="Número" WatermarkCssClass="watermarked">
                                     </asp:TextBoxWatermarkExtender>
                                     <asp:RequiredFieldValidator ID="txtNumero_RequiredFieldValidator" runat="server" ErrorMessage="O campo 'Número' esta em branco, ele deve ser preenchido"
                        Display="None" ControlToValidate="txtNumero">
                    </asp:RequiredFieldValidator>
                    <asp:ValidatorCalloutExtender ID="txtNumero_ValidatorCalloutExtender" runat="server" TargetControlID="txtNumero_RequiredFieldValidator"
                        Width="300px" PopupPosition="Right" CloseImageUrl="~/ImagensErros/Cancelar1.png"
                        WarningIconImageUrl="~/ImagensErros/Atencao.png">
                    </asp:ValidatorCalloutExtender>
                                </td>
                                <td style="padding-left: 2px">
                                     <asp:TextBox ID="txtBairro" runat="server" Height="18px" Width="200px" CssClass="nonwatermarked"
                        Font-Names="Calibri" Font-Size="16px" BorderColor="Red" BorderStyle="Solid" 
                                         BorderWidth="2px" Enabled="False" BackColor="Aqua"></asp:TextBox>
                                     <asp:TextBoxWatermarkExtender ID="txtBairro_TextBoxWatermarkExtender" 
                                         runat="server" TargetControlID="txtBairro" WatermarkText="Bairro" WatermarkCssClass="watermarked">
                                     </asp:TextBoxWatermarkExtender>
                                </td>
                                <td  style="padding-left: 2px">
                                     <asp:TextBox ID="txtCidade" runat="server" Height="18px" Width="150px" CssClass="nonwatermarked"
                        Font-Names="Calibri" Font-Size="16px" BorderColor="Red" BorderStyle="Solid" 
                                         BorderWidth="2px" Enabled="False" BackColor="Aqua"></asp:TextBox>
                                     <asp:TextBoxWatermarkExtender ID="txtCidade_TextBoxWatermarkExtender" 
                                         runat="server" TargetControlID="txtCidade" WatermarkText="Cidade" WatermarkCssClass="watermarked">
                                     </asp:TextBoxWatermarkExtender>
                                </td>
                                <td  style="padding-left: 2px">
                                     <asp:TextBox ID="txtUf" runat="server" Height="18px" Width="34px" CssClass="nonwatermarked"
                        Font-Names="Calibri" Font-Size="16px" BorderColor="Red" BorderStyle="Solid" 
                                         BorderWidth="2px" Enabled="False" BackColor="Aqua"></asp:TextBox>
                                     <asp:TextBoxWatermarkExtender ID="txtUf_TextBoxWatermarkExtender" 
                                         runat="server" TargetControlID="txtUf" WatermarkText="UF" WatermarkCssClass="watermarked">
                                     </asp:TextBoxWatermarkExtender>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td>
                                    <asp:TextBox ID="txtEmail" runat="server" Height="18px" Width="300px" CssClass="nonwatermarked"
                        Font-Names="Calibri" Font-Size="16px" BorderColor="Red" BorderStyle="Solid" 
                                         BorderWidth="2px"></asp:TextBox>
                                    <asp:TextBoxWatermarkExtender ID="txtEmail_TextBoxWatermarkExtender" 
                                        runat="server" TargetControlID="txtEmail" WatermarkText="E-Mail" WatermarkCssClass="watermarked">
                                    </asp:TextBoxWatermarkExtender>
                                    <asp:RequiredFieldValidator ID="txtEmail_RequiredFieldValidator" runat="server" ErrorMessage="O campo 'E-Mail' esta em branco, ele deve ser preenchido"
                        Display="None" ControlToValidate="txtEmail">
                    </asp:RequiredFieldValidator>
                    <asp:ValidatorCalloutExtender ID="txtEmail_ValidatorCalloutExtender" runat="server" TargetControlID="txtEmail_RequiredFieldValidator"
                        Width="300px" PopupPosition="Right" CloseImageUrl="~/ImagensErros/Cancelar1.png"
                        WarningIconImageUrl="~/ImagensErros/Atencao.png">
                    </asp:ValidatorCalloutExtender>
                    </td>
                </tr>
                <tr>
                    <td>
                        <table cellpadding="0" cellspacing="0">
                            <tr>
                                <td>
                                       <asp:TextBox ID="txtTelefone" runat="server" Height="18px" Width="100px" CssClass="nonwatermarked"
                        Font-Names="Calibri" Font-Size="16px" BorderColor="Red" BorderStyle="Solid" 
                                         BorderWidth="2px" ></asp:TextBox>
                                       <asp:TextBoxWatermarkExtender ID="txtTelefone_TextBoxWatermarkExtender" 
                                           runat="server" TargetControlID="txtTelefone" WatermarkText="Telefone" WatermarkCssClass="watermarked">
                                       </asp:TextBoxWatermarkExtender>
                                        <asp:RequiredFieldValidator ID="txtTelefone_RequiredFieldValidator" runat="server" ErrorMessage="O campo 'Telefone' esta em branco, ele deve ser preenchido"
                        Display="None" ControlToValidate="txtEmail">
                    </asp:RequiredFieldValidator>
                    <asp:ValidatorCalloutExtender ID="txtTelefone_ValidatorCalloutExtender" runat="server" TargetControlID="txtTelefone_RequiredFieldValidator"
                        Width="300px" PopupPosition="Right" CloseImageUrl="~/ImagensErros/Cancelar1.png"
                        WarningIconImageUrl="~/ImagensErros/Atencao.png">
                    </asp:ValidatorCalloutExtender>
                                </td>
                                <td style="padding-left:  2px">
                                    <asp:TextBox ID="txtContato" runat="server" Height="18px" Width="300px" CssClass="nonwatermarked"
                        Font-Names="Calibri" Font-Size="16px" BorderColor="Red" BorderStyle="Solid" 
                                         BorderWidth="2px" ></asp:TextBox>
                                    <asp:TextBoxWatermarkExtender ID="txtContato_TextBoxWatermarkExtender" 
                                        runat="server" TargetControlID="txtContato" WatermarkText="Contato" WatermarkCssClass="watermarked">
                                    </asp:TextBoxWatermarkExtender>
                                      <asp:RequiredFieldValidator ID="txtContato_RequiredFieldValidator" runat="server" ErrorMessage="O campo 'Contato' esta em branco, ele deve ser preenchido"
                        Display="None" ControlToValidate="txtEmail">
                    </asp:RequiredFieldValidator>
                    <asp:ValidatorCalloutExtender ID="txtContato_ValidatorCalloutExtender" runat="server" TargetControlID="txtContato_RequiredFieldValidator"
                        Width="300px" PopupPosition="Right" CloseImageUrl="~/ImagensErros/Cancelar1.png"
                        WarningIconImageUrl="~/ImagensErros/Atencao.png">
                    </asp:ValidatorCalloutExtender>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
            <div style="height: 5px">
            </div>
            <table>
                <tr>
                    <td>
                        <asp:ImageButton ID="bSalvar" runat="server" 
                            ImageUrl="~/Botao/btSalvar.png" onclick="bSalvar_Click" />
                    </td>
                </tr>
            </table>
            <div style="height: 5px">
            </div>
            <asp:GridView ID="gwCliente" runat="server" CellPadding="4" ForeColor="#333333" 
                GridLines="None" AutoGenerateColumns="False">
                <AlternatingRowStyle BackColor="White" />
                <Columns>
                    <asp:BoundField HeaderText="Razão Social" DataField="razaoSocial" >
                    <HeaderStyle HorizontalAlign="Left" />
                    <ItemStyle HorizontalAlign="Left" Width="200px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="email" HeaderText="E-Mail" >
                    <HeaderStyle HorizontalAlign="Left" />
                    <ItemStyle HorizontalAlign="Left" Width="200px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="telefone" HeaderText="Telefone" >
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Center" Width="130px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="contato" HeaderText="Contato" >
                    <HeaderStyle HorizontalAlign="Left" />
                    <ItemStyle HorizontalAlign="Left" Width="250px" />
                    </asp:BoundField>
                    <asp:ButtonField ButtonType="Image" ImageUrl="~/Botao/bt_Edit.png" 
                        Text="Button" />
                    <asp:ButtonField ButtonType="Image" ImageUrl="~/ImagensErros/Cancelar1.png" 
                        Text="Button" />
                </Columns>
                <EditRowStyle BackColor="#2461BF" />
                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <HeaderStyle BackColor="#AAAAAA" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                <RowStyle BackColor="#EFF3FB" />
                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                <SortedAscendingCellStyle BackColor="#F5F7FB" />
                <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                <SortedDescendingCellStyle BackColor="#E9EBEF" />
                <SortedDescendingHeaderStyle BackColor="#4870BE" />
            </asp:GridView>
        </div>
        <div style="height: 5px">
        
        </div>
</asp:Content>
